package com.sf.fy.uav.applet.operate.controller;

import com.sf.fy.uav.common.request.operate.RecordModuleDurationRequest;
import com.sf.fy.uav.common.utils.Rs;
import com.sf.fy.uav.controller.RecordModuleDurationRest;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-11-23
 */
@RestController
@RequestMapping("/home/record-module-duration/")
public class RecordModuleDurationController {

    @Autowired
    private RecordModuleDurationRest recordModuleDurationRest;

    @PostMapping("add")
    @Operation(tags = "记录埋点", description = "记录埋点")
    public Rs<Void> add(@RequestBody RecordModuleDurationRequest recordModuleDurationRequest) {
        recordModuleDurationRest.add(recordModuleDurationRequest);
        return Rs.success();
    }

}
